<!--

    Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
    Portions Copyright &#169; [2017-2020] Payara Foundation and/or affiliates.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<p><a id="task-jdbcconnectionpooledit" name="task-jdbcconnectionpooledit"></a><a id="GHJDB00037" name="GHJDB00037"></a></p>

<h4><a id="sthref17" name="sthref17"></a>To Edit JDBC Connection Pool General Settings</h4>
<a name="BEGIN" id="BEGIN"></a>
<ol>
<li>
<p>In the navigation tree, expand the Resources node.</p>
</li>
<li>
<p>Under the Resources node, expand the JDBC node.</p>
</li>
<li>
<p>Under the JDBC node, select the Connection Pools node.</p>
<p>The Connection Pools page opens.</p>
</li>
<li>
<p>Click the name of the connection pool that you are editing.</p>
<p>The Edit Connection Pool page opens.</p>
</li>
<li>
<p>From the Resource Type drop-down list, select a resource type.</p>
<p>Choices include <code>javax.sql.DataSource</code> (local transactions only), <code>javax.sql.XADataSource</code> (global transactions), and <code>java.sql.ConnectionPoolDataSource</code> (local transactions, possible performance improvements).</p>
</li>
<li>
<p>In the Datasource Classname field, type the name of the vendor-specific class that implements the <code>DataSource</code>, <code>ConnectionPoolDataSource</code>, or <code>XADataSource</code> API.</p>
<p>If you selected one of the datasource resource types, this field is usually filled in automatically with the class name associated with the resource type and database vendor you chose. If you selected the <code>java.sql.Driver</code> resource type, this field is disabled.</p>
</li>
<li>
<p>In the Driver Classname field, type the name of the vendor-specific class that implements the <code>java.sql.Driver</code> API.</p>
<p>If you selected the <code>java.sql.Driver</code> resource type, this field is usually filled in automatically with the class name associated with the driver and database vendor you chose. If you selected one of the datasource resource types, this field is disabled.</p>
</li>
<li>
<p>Select the Ping Enabled checkbox to automatically ping the pool during pool creation or reconfiguration to identify and warn of any erroneous attribute values.</p>
<p>This option is disabled by default.</p>
</li>
<li>
<p>In the Deployment Order field, type a number to specify the deployment order of the connection pool.</p>
<p>Resources with a lower number are loaded first at server startup. The default value is 100.</p>
</li>
<li>
<p>In the Description field, type a short description for the connection pool.</p>
</li>
<li>
<p>In the Initial and Minimum Pool Size field, type the minimum number of connections in this pool.</p>
<p>This value also determines the number of connections placed in the pool when the pool is first created or when Payara Server starts. The default value is 8.</p>
</li>
<li>
<p>In the Maximum Pool Size field, type the maximum number of connections in this pool.</p>
<p>The default value is 32.</p>
</li>
<li>
<p>In the Pool Resize Quantity field, type the number of connections per pool resizing batch.</p>
<p>When the pool scales up and scales down toward the maximum and minimum pool size respectively, it is resized in batches. This value determines the number of connections in the batch. Making this value too large delays connection creation and recycling; making it too small will be less efficient. The default value is 2.</p>
</li>
<li>
<p>In the Idle Timeout field, type the maximum time, in seconds, that a connection can remain idle in the pool.</p>
<p>After this time expires, the connection is removed from the pool. The default value is 300.</p>
</li>
<li>
<p>In the Max Wait Time field, type the maximum time, in milliseconds, that an application requesting a connection will wait before getting a connection timeout.</p>
<p>The default value is 60,000.</p>
</li>
<li>
<p>Select the Non Transactional Connections Enabled checkbox to return non-transactional connections.</p>
<p>This option is disabled by default.</p>
</li>
<li>
<p>Select a Transaction Isolation level for the connection pool from the drop-down list.</p>
<p>If not specified, the connections operate with default isolation levels provided by the JDBC driver. By default, this option is not specified.</p>
</li>
<li>
<p>Select the Isolation Level Guaranteed checkbox so that all connections taken from the pool have the same isolation level.</p>
<p>For example, if the isolation level for the connection is changed programmatically (with <code>con.setTransactionIsolation</code>) when last used, this mechanism changes the status back to the specified isolation level.</p>
<p>This setting is only applicable if a transaction isolation level has been specified.</p>
</li>
<li>
<p>Click the Ping button to verify the database connection.</p>
<p>The Administration Console attempts to connect to the database. If an error message appears, check to see if the database server has been started.</p>
</li>
<li>
<p>Click the Flush button to reset the connection pool to its initial state.</p>
<p>Any existing live connections are destroyed, which means that the transactions associated with these connections are lost. The subcommand then recreates the initial connections for the pool, and restores the pool to its steady pool size.</p>
</li>
<li>
<p>Click Save.</p>

<hr>
<p><b>Tip:</b></p>
<p>To return to the default settings, click the Load Defaults button, then click Save.</p>

<hr>

</li>
</ol>
<a id="sthref18" name="sthref18"></a>
<h5>See Also</h5>
<ul>
<li>
<p><a href="task-setdbaccess.html">To Set Up Database Access</a></p>
</li>
<li>
<p><a href="task-integratejdbcdriver.html">To Integrate a JDBC Driver</a></p>
</li>
<li>
<p><a href="task-jdbcresourcenew.html">To Create a JDBC Resource</a></p>
</li>
<li>
<p><a href="task-jdbcresourcesedit.html">To Edit a JDBC Resource</a></p>
</li>
<li>
<p><a href="task-jdbcresourcetargets.html">To Edit JDBC Resource Targets</a></p>
</li>
<li>
<p><a href="task-jdbcresourcesdelete.html">To Delete a JDBC Resource</a></p>
</li>
<li>
<p><a href="task-jdbcconnectionpoolnew.html">To Create a JDBC Connection Pool</a></p>
</li>
<li>
<p><a href="task-jdbcconnectionpooladvance.html">To Edit JDBC Connection Pool Advanced Attributes</a></p>
</li>
<li>
<p><a href="task-verifyconnpoolsettings.html">To Verify Connection Pool Settings</a></p>
</li>
<li>
<p><a href="task-jdbcconnectionpoolproperty.html">To Edit JDBC Connection Pool Properties</a></p>
</li>
<li>
<p><a href="task-jdbcconnectionpooldelete.html">To Delete a JDBC Connection Pool</a></p>
</li>
</ul>


<small>Copyright &#169; 2005, 2017, Oracle and/or its affiliates. All rights reserved. <a href="docinfo.html">Legal Notices</a></small>
<small>Portions Copyright &#169; [2017-2020] Payara Foundation and/or affiliates.</small>
